/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controlacciones.ejb3.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author vanessa
 */
@Embeddable
public class TbLectura1PK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_lectura")
    private int idLectura;
    @Basic(optional = false)
    @Column(name = "medfacfec")
    @Temporal(TemporalType.TIMESTAMP)
    private Date medfacfec;

    public TbLectura1PK() {
    }

    public TbLectura1PK(int idLectura, Date medfacfec) {
        this.idLectura = idLectura;
        this.medfacfec = medfacfec;
    }

    public int getIdLectura() {
        return idLectura;
    }

    public void setIdLectura(int idLectura) {
        this.idLectura = idLectura;
    }

    public Date getMedfacfec() {
        return medfacfec;
    }

    public void setMedfacfec(Date medfacfec) {
        this.medfacfec = medfacfec;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idLectura;
        hash += (medfacfec != null ? medfacfec.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TbLectura1PK)) {
            return false;
        }
        TbLectura1PK other = (TbLectura1PK) object;
        if (this.idLectura != other.idLectura) {
            return false;
        }
        if ((this.medfacfec == null && other.medfacfec != null) || (this.medfacfec != null && !this.medfacfec.equals(other.medfacfec))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "controlacciones.ejb3.entity.TbLectura1PK[idLectura=" + idLectura + ", medfacfec=" + medfacfec + "]";
    }

}
